Repository navigation
Add redis-best-practices skill - #61
Merged
Merged
Conversation
Adds a skill of Redis performance and scale rules, based on real support cases and measured on an Upstash Redis Pay as You Go database, free scratch databases and stock Redis 8. It covers cache vs store, batching, key and value size, TTLs, commands, scripts, connections and operations, and explains the Upstash errors an agent is likely to hit. Five rules link to knowledge base articles that show the measurements. Also lists the skill in the README and skills.sh.json, points upstash-redis-js at it, and regenerates skills/upstash.
Renames upstash-redis-best-practices to redis-best-practices, so it serves anyone running Redis rather than only Upstash users. Every rule stays. Rules now apply to any deployment and carry stock Redis measurements alongside Upstash ones, and what only applies to Upstash moves to its own section. Adds stock Redis guidance on eviction defaults, hot keys, cluster slots, BUSY, script eviction, the replication backlog and the INFO fields to watch, plus a table of common errors.
Scripts take a global lock on Upstash unless they use allow-key-locking. Open source Redis and Valkey reject the flag, so scope it to Upstash and add the error. Stop narrowing the Upstash test engine to Pay as You Go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
redis-best-practices, a skill of performance and scale rules for anyone running Redis: open source, Valkey, managed services or Upstash. It starts from the support team's list and is checked against real databases.What's in it
Also lists the skill in the README and
skills.sh.json, adds a pointer fromupstash-redis-js, and regeneratesskills/upstash.It's the first skill in this repo without the
upstash-prefix. That's deliberate, because its audience is everyone using Redis.Where the skill differs from the support list
Measurements changed these rules:
SCANwithMATCH: the list saysMATCHwalks every key. That holds on stock Redis and for leading wildcards on Upstash, but a fixed prefix on Upstash found 100 keys among 1 million in 1 page and 2 ms.redis.call, so aGETand aSETcount as 3.Upstash engine behaviour to check
Measured, and undocumented or at odds with the docs:
XRANGE key - +returns at most 1,000 entries with no error. The XRANGE docs say it reads the whole stream.KEYSfails above about 5,000 results, and for any pattern once the database holds about 100,000 keys.allow-key-lockingprotects unrelated keys on Pay as You Go, but changed nothing on a free scratch database.Not in this PR
No plugin version bump, since recent bumps shipped as their own PR. Plugin users get the skill at the next one.
Test plan
npm run checkpasses on the committed tree